package cn.lcc.feignclient;

import cn.lcc.domain.User;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class CallBackFactiory implements FallbackFactory<IUserFeignClient> {
    @Override
    public IUserFeignClient create(Throwable throwable) {
        return id-> new User(-1L,"服务暂时不可用");
    }
}
